package com.lcm.basic.p5.extend;

/**
 * @author Coder-lcm
 * @date 2021/3/31
 */
public class TestExtends {
    public static void main(String[] args) {
        Children children = new Children(1,"lcm", 20);
        children.baseMethod();
        children.childrenMethod();

        System.out.println(children instanceof Base); // true
        System.out.println(children instanceof Children); // true

        Base base = (Base) children;
        base.baseMethod();
    }
}
